<template>
	<view class="con">
		<view class="item" v-for="(item,index) in sqlist">
			<view class="title">{{index+1}}、{{item.communityName}}</view>
			<view class="bb">
				<view class="imgbox">
					<view class="bg">
						<view>TOP</view>
						<view>{{index+1}}</view>
					</view>
					<image :src="item.communityImage" mode="aspectFill" class="img"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getsq
	} from "../../api/index.js"
	export default{
		data(){
			return{
				sqlist:[]
			}
		},
		onLoad() {
			this.getsq()
		},
		methods:{
			// 最美社区
			async getsq(){
				let res=await this.get(getsq)
				this.sqlist=res.data
			},
		}
		
	}
</script>

<style>
	.bg{
		width: 76rpx;
		height: 90rpx;
		/* background: #F09238; */
		background-image: url(../../static/bg/bj.png);
		background-size: 76rpx 90rpx;
		opacity: 1;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 9;
		display: flex;
		flex-direction: column;
		align-items: center;
		/* justify-content: center; */
		color: #FFFFFF;
		font-size: 30rpx;
		font-weight: bold;
		line-height: 34rpx;
		padding-top: 5rpx;
	}
	.imgbox{
		width:690rpx;
		height: 400rpx;
		position: relative;
		border: 20rpx;
		overflow: hidden;
	}
	.jifen{
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 42rpx;
		color: #333333;
		opacity: 1;
		margin-left: 40rpx;
	}
	.name{
		height: 45rpx;
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: bold;
		line-height: 45rpx;
		color: #333333;
		opacity: 1;
		margin-left: 40rpx;
		margin-top: 60rpx;
	}
	.img{
		width: 690rpx;
		height: 400rpx;
		display: block;
	}
	.bb{
		display: flex;
		margin-top: 20rpx;
		border-radius: 10rpx;
		overflow: hidden;
	}
	.title{
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 34rpx;
		color: #333333;
		opacity: 1;
	}
	.item{
		margin-bottom: 40rpx;
	}
	.con{
		padding: 0 30rpx 40rpx;
		
	}
</style>
